-
-
Notifications
You must be signed in to change notification settings - Fork 945
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ticket/10744] Reserved style directory names #690
Conversation
@@ -26,6 +26,7 @@ class acp_styles | |||
var $mode; | |||
var $styles_path; | |||
var $styles_path_absolute = 'styles'; | |||
var $reserved_keywords = array('all', 'admin', 'all'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all listed twice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doh. Thanks
Looks good. 👍 |
Prevent user from installing styles with reserved directory names PHPBB3-10744
Updated. Fixed merge conflict and renamed $reserved_keywords to $reserved_paths because that array is array of style paths |
@@ -272,6 +272,7 @@ | |||
'REPLACE_THEME_EXPLAIN' => 'This theme will replace the one you are deleting in any styles that use it.', | |||
'REPLACE_WITH_OPTION' => 'Replace with “%s”', | |||
'REQUIRES_STYLE' => 'This style requires the style "%s" to be installed.', | |||
'RESERVED_STYLE_DIR' => 'Directory "%s" is reserved, please move style to a different directory.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe use "style name" instead of "directory"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style names are not related to directories, so that would be incorrect. Simply renaming directory will make style installable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is it even possible that name and directory differ? Is there any advantage to that? Can't we just make it a lot simpler by requiring they always be the same?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No idea why. I also have no idea why template inheritance works by style name instead of directory name (but stores path in database).
I think it would make sense to use directory name for style name. Maybe close this PR for now and make RFC about removing style name completely?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, let's do that.
Diff looks good. |
Prevent user from installing styles with reserved directory names
http://tracker.phpbb.com/browse/PHPBB3-10744